import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter, Route, Link } from './lib/mine-router';

import LoginPage from './pages/LoginPage';
import ContextPage from './pages/ContextPage';

import './index.css';

const App = () => {
    return (
        // 历史模式的理由器
        <BrowserRouter>
            <nav>
                <Link to="/login">登录</Link>
                <Link to="/context">上下文</Link>
            </nav>

            <Route path="/login" component={LoginPage} />
            <Route path="/context" component={ContextPage} />
        </BrowserRouter>
    );
};

ReactDOM.render(<App />, document.getElementById('root'));
